package me.macd.mindoc.service.impl;

import me.macd.mindoc.dao.MemberDao;
import me.macd.mindoc.model.Members;
import me.macd.mindoc.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @program: mindoc
 * @description: ${description}
 * @author: 2018-09-19
 * @create: 2018-09-19 14:21
 */
@Service
public class MemberServiceImpl implements MemberService {

    @Autowired
    private MemberDao memberDao;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public Members findByAccount(String account) {
        return memberDao.findByAccount(account);
    }

    @Override
    @Transactional(propagation = Propagation.REQUIRED)
    public int update(Members members) {
        return memberDao.update(members);
    }
}
